package com.kasax.imgloader.v1;

public class DisplayImageOptions {

    private final ScaleType scaleType;

    public DisplayImageOptions(Builder builder) {
        this.scaleType = builder.scaleType;
    }

    public ScaleType scaleType() {
        return scaleType;
    }

    public static enum ScaleType {

        MATRIX(0),

        FIT_XY(1),

        FIT_START(2),

        FIT_CENTER(3),

        FIT_END(4),

        CENTER(5),

        CENTER_CROP(6),

        CENTER_INSIDE(7);

        private final int typeValue;

        ScaleType(int typeValue) {
            this.typeValue = typeValue;
        }
    }

    public static final class Builder {
        ScaleType scaleType;

        public Builder centerCrop() {
            scaleType = ScaleType.CENTER_CROP;
            return this;
        }

        public Builder fitXy() {
            scaleType = ScaleType.FIT_XY;
            return this;
        }

        public DisplayImageOptions build() {
            return new DisplayImageOptions(this);
        }
    }
}
